import routeComponentName from '@/config/route-component-name'

const netRouter = [
  {
    path: '/net',
    component: () => import('@/layout/index.vue'),
    name: 'net',
    meta: {
      title: '部门管理',
      icon: 'MapLocation',
    },
    redirect: '/net/list',
    children: [
      {
        path: 'list',
        component: () => import('@/views/network/list/index.vue'),
        name: 'netList',
        meta: {
          title: '部门列表',
          keepAlive: true,
          componentName: routeComponentName.network.networkList,
        },
      },
      {
        path: 'new',
        component: () => import('@/views/network/new/index.vue'),
        name: 'Newnet',
        meta: {
          title: '新增部门',
          keepAlive: true,
          componentName: routeComponentName.network.networkForm,
        },
        hidden: true,
      },
      {
        path: 'editDetails/:id',
        component: () => import('@/views/network/new/index.vue'),
        name: 'editDetails',
        meta: {
          title: '编辑部门',
          keepAlive: true,
          componentName: routeComponentName.network.networkForm,
        },
        hidden: true,
      },
      // 跳转页面
      {
        path: 'netdetail/:id',
        component: () => import('@/views/network/list/netdetail/index.vue'),
        name: 'netDetail',
        meta: {
          title: '部门详情',
          keepAlive: true,
          componentName: routeComponentName.network.networkDetail,
        },
        hidden: true,
      },
      //服务人员
      {
        path: 'empList',
        component: () => import('@/views/network/emp/list/index.vue'),
        name: 'empList',
        meta: {
          title: '部门工程师',
          icon: 'MapLocation',
          keepAlive: true,
          componentName: routeComponentName.network.networkEmpList,
        },
      },
      {
        path: 'empExcelImport',
        component: () => import('@/views/excel/index.vue'),
        name: 'empExcelImport',
        meta: {
          title: '导入工程师',
          keepAlive: true,
          componentName: routeComponentName.common.import,
        },
        hidden: true,
      },
      {
        path: 'networkImport',
        component: () => import('@/views/excel/index.vue'),
        name: 'networkImport',
        meta: {
          title: '部门资料导入',
          keepAlive: true,
          componentName: routeComponentName.common.import,
        },
        hidden: true,
      },
    ],
  },
]

export default netRouter
